package com.zkthink.ceres.store.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.zkthink.base.entity.Entity;
import java.time.LocalDate;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import static com.zkthink.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 店铺每日统计表
 * </p>
 *
 * @author kellen
 * @since 2020-07-18
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("ceres_store_daily_statistic")
@ApiModel(value = "StoreDailyStatistic", description = "店铺每日统计表")
@AllArgsConstructor
public class StoreDailyStatistic extends Entity<Long> {

    private static final long serialVersionUID = 1L;

    /**
     * 店铺id
     */
    @ApiModelProperty(value = "店铺id")
    @TableField("store_id")
    @Excel(name = "店铺id")
    private Long storeId;

    /**
     * 日期
     */
    @ApiModelProperty(value = "日期")
    @NotNull(message = "日期不能为空")
    @TableField("trx_date")
    @Excel(name = "日期", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDate trxDate;

    /**
     * 加入购物车次数
     */
    @ApiModelProperty(value = "加入购物车次数")
    @NotNull(message = "加入购物车次数不能为空")
    @TableField("add_cart_count")
    @Excel(name = "加入购物车次数")
    private Integer addCartCount;

    /**
     * 访问次数
     */
    @ApiModelProperty(value = "访问次数")
    @NotNull(message = "访问次数不能为空")
    @TableField("pv")
    @Excel(name = "访问次数")
    private Integer pv;

    /**
     * 结算次数
     */
    @ApiModelProperty(value = "结算次数")
    @NotNull(message = "结算次数不能为空")
    @TableField("settle_count")
    @Excel(name = "结算次数")
    private Integer settleCount;

    /**
     * 支付成功次数
     */
    @ApiModelProperty(value = "支付成功次数")
    @NotNull(message = "支付成功次数不能为空")
    @TableField("pay_success_count")
    @Excel(name = "支付成功次数")
    private Integer paySuccessCount;

    /**
     * 支付次数
     */
    @ApiModelProperty(value = "支付次数")
    @NotNull(message = "支付次数不能为空")
    @TableField("pay_count")
    @Excel(name = "支付次数")
    private Integer payCount;


    @Builder
    public StoreDailyStatistic(Long id, LocalDateTime updateTime, LocalDateTime createTime, Long createUser, Long updateUser, 
                    Long storeId, LocalDate trxDate, Integer addCartCount, Integer pv, Integer settleCount, 
                    Integer paySuccessCount, Integer payCount) {
        this.id = id;
        this.updateTime = updateTime;
        this.createTime = createTime;
        this.createUser = createUser;
        this.updateUser = updateUser;
        this.storeId = storeId;
        this.trxDate = trxDate;
        this.addCartCount = addCartCount;
        this.pv = pv;
        this.settleCount = settleCount;
        this.paySuccessCount = paySuccessCount;
        this.payCount = payCount;
    }

}
